package com.zzj.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author zzj
 * @since 2023-07-22
 */
@Getter
@Setter
@TableName("blog_comment")
@Schema(name = "Comment", description = "$!{table.comment}")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "被评论 目标ID")
    private Integer targetId;

    @Schema(description = "被评论 目标类型")
    private Integer targetType;

    @Schema(description = "评论者ID")
    private Integer fromId;

    @Schema(description = "评论者用户名")
    private String fromUsername;

    @Schema(description = "评论者头像")
    private String fromAvatar;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "点赞数量")
    private Integer likes;

    @Schema(description = "评论时间")
    private LocalDateTime createdAt;

    @Schema(description = "状态")
    private Integer status;
}
